<%@ page language="java" import="java.util.*,model.submitRecord" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>作业打分</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <link rel="stylesheet" type="text/css" href="css/div-style.css">
    <link rel="stylesheet" type="text/css" href="css/table.css">
     <link rel="stylesheet" type="text/css" href="css/form.css">
     <script src="js/btn.js" type="text/javascript" charset="GBK"></script>
  </head>
  
  <body>
    <div class="main">
    <div class="div_top">
        <div id="info">
            <p id="p1">欢迎您，${username}</p><a class="ainfo" href="">修改密码</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="ainfo" href="/wdcoursemgn/logout">注销</a>
        </div>
    </div>
    <div  class="teacher_left">
          <!-- 左边菜单栏 -->
         <div id="menu">
              <!-- 修饰，无实际作用 -->
         </div>
         <div class="list">
                <ul class="list1">
                  <li> <a class="a-list" href="/wdcoursemgn/yearmgn"><font>学年管理</font></a></li>
                  <li> <a class="a-list" href="/wdcoursemgn/release"><font>作业发布</font></a></li>
                  <li> <a class="a-list" href="/wdcoursemgn/checksubmit"><font>作业查看</font></a></li>
                  <li> <a class="a-select" href="/wdcoursemgn/grade"><font>作业打分</font></a></li>
                  <li> <a class="a-list" href=""><font>作业展示</font></a></li>
                </ul>
         </div>
    </div>
    <div  class="div_right">
       <div class="grade">
         <p>作业提交情况</p>
            <%
                    ArrayList<submitRecord> submitlist=(ArrayList<submitRecord>)request.getAttribute("submitlist");
             %>
             ${addGradeMsg}
          <table id="table-1">
              <tr>
                  <th>作业编号</th>
                  <th>学号</th>
                  <th>姓名</th>
                  <th>提交状态</th>
                  <th>下载</th>
                  <th>打分</th>
              </tr>
              <%
                  for(int i=0;i<submitlist.size();i++){
                     submitRecord record=submitlist.get(i);
               %>
                 <tr>
                    <td><%=record.getWork_id() %></td>
                    <td><%=record.getStu_id() %></td>
                    <td><%=record.getName() %></td>
                    <td><%=record.getSubmitstate() %></td>
                    <td>暂未实现</td>
                    <td>
                    <form action="addGrade" id="addgrade">
                     <input type="hidden" name="work_id" value="<%=record.getWork_id()%>">
                     <input type="hidden" name="stu_id" value="<%=record.getStu_id() %>">
                     <input type="text"  class="text1" value="<%=record.getGrade() %>" name="grade">
                     <input type="submit" value="提交" >
                    </form>
                  </td>
                 </tr>
               <%
                  }
                %>
          </table> 
          </div> 
    </div>
       
    </div>
  </body>
</html>